#include "mainwindow.h"
#include <QApplication>
#include <QMessageBox>
#include <QString>

bool mode;

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    if(argc!=3){
        QMessageBox::critical(nullptr,"error","Parameter is not valid! Please run this program in terminal.");
        exit(1);
    }
    QString roomNo(argv[1]);
    QString mode_s(argv[2]);
    if(mode_s==QString("0")) mode=false;
    else if(mode_s==QString("1")) mode=true;
    else exit(0);
    MainWindow w(roomNo);
    w.show();

    return a.exec();
}
